Part Number Hot Search : 
101EF ZX84C3 1N944 D78F9418 MAX134 EA100 DS3991 F1640
Product Description
Full Text Search
 

To Download MMA8452Q Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  freescale semiconductor document number: MMA8452Q data sheet: technical data rev. 5, 07/2012 an energy-efficient solution by freescale ? 2012 freescale semiconductor, inc. all righ ts reserved. 3-axis, 12-bit/8-bit digital accelerometer the MMA8452Q is a smart low-power, three-axis, capacitive micromachined accelerometer with 12 bits of resolution. this accelerometer is packed with embedded functions with flexible user programmable options, configurable to two interrupt pins. embedded interrupt functions allow for overall power savings relieving the host processor from continuously polling data. the MMA8452Q has user selectable full scales of 2g/4g/8g with high-pass filter filtered data as we ll as non-filtered data availabl e real-time. the device can be configured to generate inertial wakeup interrupt signals from any combination of the configurable embedded functions allowing the MMA8452Q to monitor events and remain in a low power mode during periods of inactivity. the MMA8452Q is available in a 3 mm by 3 mm by 1 mm qfn package. features ? 1.95v to 3.6v supply voltage ? 1.6v to 3.6v interface voltage ? 2g/4g/8g dynamicall y selectable full-scale ? output data rates (odr) from 1.56 hz to 800 hz ? 99 g/ hz noise ? 12-bit and 8-bit digital output ?i 2 c digital output interface ? two programmable interrupt pins for six interrupt sources ? three embedded channels of motion detection ? freefall or motion detection: 1 channel ? pulse detection: 1 channel ? transient detection: 1 channel ? orientation (portrait/landscape) detection with set hysteresis ? automatic odr change for auto-wake and return to sleep ? high-pass filter data available real-time ?self-test ? rohs compliant ? current consumption: 6 a ? 165 a typical applications ? ecompass applications ? static orientation detection (portrait/landscape, up/down, left/right, back/ front position identification) ? notebook, ereader and laptop tumble and freefall detection ? real-time orientation detection (virtual reality and gaming 3d user position feedback) ? real-time activity analysis (pedometer step counting, freefall drop detection for hdd, dead-reckoning gps backup) ? motion detection for portab le product power saving (auto-sleep and au to-wake for cell phone, pda, gps, gaming) ? shock and vibration monitoring (mechatronic compensation, shipping and warranty usage logging) ? user interface (menu scrolling by orientation change, pulse detection for button replacement ) ordering information part number temperature range package description shipping MMA8452Qt -40c to +85c qfn-16 tray MMA8452Qr1 -40c to +85c qfn-16 tape and reel MMA8452Q 16 pin qfn 3 mm by 3 mm by 1 mm case 2077-02 top and bottom view top view pin connections 1 2 3 4 59 10 11 12 13 14 15 16 876 nc vdd nc vddio byp nc scl gnd nc gnd int1 gnd int2 sa0 nc sda
MMA8452Q sensors 2 freescale semiconductor, inc. related documentation the MMA8452Q device features and operations are described in a variety of reference manuals, user guides, and application notes. to find the most-current versions of these documents: 1. go to the freescale homepage at: http://www.freescale.com/ 2. in the keyword search box at the top of the page, enter the device number MMA8452Q. 3. in the refine your result pane on the left, click on the documentation link. contents 1 block diagram and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 soldering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 mechanical and electrical specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 mechanical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 electrical characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 i 2 c interface characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1 sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 zero-g offset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.3 self-test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4 modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 5 functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5.1 device calibration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.2 8-bit or 12-bit data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.3 low-power modes vs. high-resolution modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.4 auto-wake/sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.5 freefall and motion detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.6 transient detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.7 pulse detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.8 orientation detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.9 interrupt register configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.10 serial i 2 c interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 6 register descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6.1 data registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6.2 portrait/ landscape embedded function registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.3 motion and freefall embedded function registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 6.4 transient (hpf) acceleration detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.5 single, double and directional pulse-detection registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.6 auto-wake/sleep detectio n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.7 control registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6.8 user offset correction registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
MMA8452Q sensors freescale semiconductor, inc. 3 1 block diagram and pin description figure 1. block diagram figure 2. direction of the detectable accelerations 12-bit sda scl i 2 c embedded dsp functions c to v internal osc clock gen adc converter vddio vss x-axis transducer y-axis transducer z-axis transducer freefall and motion detection transient detection (i.e., fast motion, transient) orientation with set hysteresis and z-lockout shake detection through motion threshold single, double auto-wake/auto-sleep configurable with debounce counter and multiple motion interrupts for control auto-wake/sleep active mode sleep vdd & directional int1 int2 mode options low power low noise + power high resolution normal mode options low power low noise + power high resolution normal active mode wake pulse detection 1 direction of the detectable accelerations (bottom view) 5 9 13 x y z 1 (top view) earth gravity
MMA8452Q sensors 4 freescale semiconductor, inc. figure 3 shows the device configuration in the si x different orientation modes. these orie ntations are defined as the following: pu = portrait up, lr = landscape right, pd = portrait down, ll = landscape left, back and front side views. there are several registers to configure the orientation detection and are described in detail in the register setting section. figure 3. landscape/portrait orientation figure 4. application diagram top view pu earth gravity pin 1 xout @ 0g yout @ -1g zout @ 0g xout @ 1g yout @ 0g zout @ 0g xout @ 0g yout @ 1g zout @ 0g xout @ -1g yout @ 0g zout @ 0g ll pd lr side view front xout @ 0g yout @ 0g zout @ 1g back xout @ 0g yout @ 0g zout @ -1g 0.1f 1.6v-3.6v vddio vddio vddio 4.7k 4.7k 1 gnd vddio scl nc int2 int1 gnd gnd sda sa0 vdd nc nc nc byp nc MMA8452Q 2 16 12 13 1415 11 10 3 4 5 6 7 8 9 4.7f int1 int2 sa0 0.1f 1.95v - 3.6v vdd scl sda
MMA8452Q sensors freescale semiconductor, inc. 5 the device power is supplied through vdd line. power supply de coupling capacitors (100 nf ceramic plus 4.7 f bulk, or a single 4.7 f ceramic) should be placed as near as possible to the pins 1 and 14 of the device. the control signals scl, sda, and sa0 are not tolerant of voltages more than vddio + 0.3v. if vddio is removed, the control signals scl, sda, and sa0 will clamp any logic si gnals with their internal esd protection diodes. the functions, the threshold and the timing of the two interr upt pins (int1 and int2) are user programmable through the i 2 c interface. the sda and scl i 2 c connections are open drain and therefore require a pullup resistor as shown in the application diagram in figure 4 . 1.1 soldering information the qfn package is compliant with the ro hs standard. please refer to an4077. table 1. pin descriptions pin # pin name description pin status 1 vddio power supply for io pins (1.62v - 3.6v) input 2byp bypass capacitor (0.1 f) input 3nc leave open. do not connect. open 4scl i 2 c serial clock open drain 5gnd connect to ground input 6sda i 2 c serial data open drain 7 sa0 i 2 c least significant bit of the device i 2 c address input 8nc internally not connected (can be gnd or vdd) input 9int2 inertial interrupt 2 output 10 gnd connect to ground input 11 int1 inertial interrupt 1 output 12 gnd connect to ground input 13 nc internally not connected (can be gnd or vdd) input 14 vdd internal power supply (1.95v - 3.6v) input 15 nc internally not connected (can be gnd or vdd) input 16 nc internally not connected (can be gnd or vdd) input
MMA8452Q sensors 6 freescale semiconductor, inc. 2 mechanical and electr ical specifications 2.1 mechanical characteristics table 2. mechanical characteristics @ vdd = 2.5v , vddio = 1.8v, t = 25c unless otherwise noted . parameter test conditions symbol min typ max unit measurement range (1) 1. dynamic range is limited to 4g when the low- noise bit in register 0x2a, bit 2 is set. fs[1:0] set to 00 2g mode fs 2 g fs[1:0] set to 01 4g mode 4 fs[1:0] set to 10 8g mode 8 sensitivity fs[1:0] set to 00 2g mode so 1024 counts/g fs[1:0] set to 01 4g mode 512 fs[1:0] set to 10 8g mode 256 sensitivity accuracy (2) 2. sensitivity remains in spec as stated, but changing oversampling mode to low power causes 3% sensitivity shift. this behavior is also seen when changing from 800 hz to any other data rate in the normal, low noise + low power or high resolution mode. soa 2.64 % sensitivity change vs. temperature fs[1:0] set to 00 2g mode tcso 0.008 %/c fs[1:0] set to 01 4g mode fs[1:0] set to 10 8g mode zero-g level offset accuracy (3) 3. before board mount. fs[1:0] 2g, 4g, 8g tyoff 17 mg zero-g level offset accuracy post board mount (4) 4. post board mount offset specifications ar e based on an 8 layer pcb, relative to 25c. fs[1:0] 2g, 4g, 8g tyoffpbm 20 mg zero-g level change vs. temperature -40c to 85c tcoff 0.15 mg/c self-test output change (5) x y z 5. self-test is one direction only. fs[1:0] set to 0 4g mode vst +181 +255 +1680 lsb odr accuracy 2 mhz clock 2 % output data bandwidth bw odr/3 odr/2 hz output noise normal mode odr = 400 hz noise 126 g/ hz output noise low-noise mode (1) normal mode odr = 400 hz noise 99 g/ hz operating temperature range top -40 +85 c
MMA8452Q sensors freescale semiconductor, inc. 7 2.2 electrical characteristics table 3. electrical characterist ics @ vdd = 2.5v, vddio = 1.8v, t = 25c unless otherwise noted . parameter test conditions symbol min typ max unit supply voltage vdd (1) 1. there is no requirement for power supply sequencing. the vddio input voltage can be higher than the vdd input voltage. 1.95 2.5 3.6 v interface supply voltage vddio (1) 1.62 1.8 3.6 v low-power mode odr = 1.56 hz i dd lp 6 a odr = 6.25 hz 6 odr = 12.5 hz 6 odr = 50 hz 14 odr = 100 hz 24 odr = 200 hz 44 odr = 400 hz 85 odr = 800 hz 165 normal mode odr = 1.56 hz i dd 24 a odr = 6.25 hz 24 odr = 12.5 hz 24 odr = 50 hz 24 odr = 100 hz 44 odr = 200 hz 85 odr = 400 hz 165 odr = 800 hz 165 current during boot sequence, 0.5 msec max duration using recommended bypass cap vdd = 2.5v idd boot 1ma value of capacitor on byp pin -40c 85c cap 75 100 470 nf standby mode current @25c vdd = 2.5v, vddio = 1.8v standby mode i dd stby 1.8 5 a digital high level input voltage scl, sda, sa0 vih 0.7*vddio v digital low-level input voltage scl, sda, sa0 vil 0.3*vddio v high level output voltage int1, int2 i o = 500 a voh 0.9*vddio v low-level output voltage int1, int2 i o = 500 a vol 0.1*vddio v low-level output voltage sda i o = 500 a vols 0.1*vddio v power on ramp time 0.001 1000 ms time from vddio on and vdd > vmin until i 2 c ready for operation cbyp = 100 nf bt ? 350 500 s turn-on time (standby) (2) 2. note that the first sample is typically not very precise. depending on odr/mods settings, a mini mum of three samples is recom mended for full precision. ton stby 1.1/odr s turn-on time (power down to standby) ton 2 ms operating temperature range top -40 +85 c
MMA8452Q sensors 8 freescale semiconductor, inc. 2.3 i 2 c interface characteristics table 4. i 2 c slave timing values (1) 1. all values referred to vih (min) and vil (max) levels. parameter symbol i 2 c fast mode unit min max scl clock frequency pullup = 4.7 k , cb = 20 pf pullup = 4.7 k , cb = 40 pf pullup = 4.7 k , cb = 400 pf pullup = 1 k , cb = 20 pf pullup = 1 k , cb = 400 pf f scl 0 0 0 0 0 2.250 100 nonfunctional 4.50 750 mhz khz ? mhz khz bus free time between stop and start condition t buf 1.3 s repeated start hold time t hd;sta 0.6 s repeated start setup time t su;sta 0.6 s stop condition setup time t su;sto 0.6 s sda data hold time (2) 2. t hd;dat is the data hold time that is measur ed from the falling edge of scl, applies to data in transmission and the acknowledge. t hd;dat 0.05 (3) 3. the maximum t hd;dat could be 3.45 s and 0.9 s for standard mode and fast mode, but must be less than the maximum of t vd;dat or t vd;ack by a transition time. s sda valid time (4) 4. t vd;dat = time for data signal from scl low to sda out put (high or low, depending on which one is worse). t vd;dat 0.9 (3) s sda valid acknowledge time (5) 5. t vd;ack = time for acknowledgement signal from scl low to sd a output (high or low, depending on which one is worse). t vd;ack 0.9 (3) s sda setup time t su;dat 100 (6) 6. a fast mode i 2 c device can be used in a standard mode i 2 c system, but the requirement t su;dat 250 ns must then be met. this will automatically be the case if the device does not stretch the low period of the scl signal. if such a device does stretch the lo w period of the scl signal, it must output the next data bit to the sda line t r (max) + t su;dat = 1000 + 250 = 1250 ns (according to the standard mode i 2 c specification) before the scl line is released. al so the acknowledge timing must meet this setup time ns scl clock low time t low 4.7 s scl clock high time t high 4 s sda and scl rise time t r 1000 ns sda and scl fall time (7) (8) 7. cb = total capacitance of one bus line in pf. 8. the maximum t f for the sda and scl bus lines is specified at 300 ns. the maximum fall time for the sda output stage t f is specified at 250 ns. this allows series protection resistors to be connected in between the sda and t he scl pins and the sda/scl bus lines without e xceeding the maximum specified t f . t f 300 ns pulse width of spikes on sda and scl that must be suppressed by input filter t sp 05 0n s
MMA8452Q sensors freescale semiconductor, inc. 9 figure 5. i 2 c slave timing diagram 2.4 absolute maximum ratings stresses above those listed as ?absolute maximum ratings? may cause permanent damage to the device. exposure to maximum rating conditions for extended periods may affect device reliability. table 5. maximum ratings rating symbol value unit maximum acceleration (all axes, 100 s) g max 5,000 g supply voltage vdd -0.3 to + 3.6 v input voltage on any control pin (sa0, scl, sda) vin -0.3 to vddio + 0.3 v drop test d drop 1.8 m operating temperature range t op -40 to +85 c storage temperature range t stg -40 to +125 c table 6. esd and latchup protection characteristics rating symbol value unit human body model hbm 2000 v machine model mm 200 v charge device model cdm 500 v latchup current at t = 85c ? 100 ma this device is sensitive to mec hanical shock. improper handling can c ause permanent damage of the part or cause the part to otherwise fail. this device is sensitive to esd, improper handling can cause permanent damage to the part.
MMA8452Q sensors 10 freescale semiconductor, inc. 3 terminology 3.1 sensitivity the sensitivity is represented in counts/g. in 2g mode the sensitivity is 1024 co unts/g. in 4g mode the sensitivity is 512 counts/g and in 8g mode the sensitivity is 256 counts/g. 3.2 zero-g offset zero-g offset (tyoff) describes the deviation of an actual output signal from the ideal output signal if the sensor is stationa ry. a sensor stationary on a horizontal surface will measure 0g in x-ax is and 0g in y-axis whereas the z-axis will measure 1g. the ou tput is ideally in the middle of the dynamic r ange of the sensor (content of out register s 0x00, data expressed as 2's complement number). a deviation from ideal value in this case is called zero -g offset. offset is to some extent a result of stress on the mems sensor and therefore the offset can slightly change after mounting the sensor onto a printed circuit board or exposing it to extensive mechanical stress. 3.3 self-test self-test checks the transducer functionality without external mechanical st imulus. when self-test is activated, an electrostat ic actuation force is applied to the sensor, simulating a small a cceleration. in this case the sensor outputs will exhibit a chang e in their dc levels which are related to the selected full scale throug h the device sensitivity. when self-test is activated, the d evice output level is given by the algebraic sum of the signals produced by the acceleration acting on the sensor and by the electros tatic test-force. 4 modes of operation figure 6. MMA8452Q mode transition diagram all register contents are preserved when transitioning from active to standby mode. some registers are reset when transitioning from standby to active. these are all noted in the device memory map register table. the sleep and wake modes are active modes. for more information on how to use the sleep and wake modes and how to transition between these modes please refer to the functi onality section of this document. table 7. mode of operation description mode i 2 c bus state vdd vddio function description off powered down <1.8v vddio can be > vdd the device is powered off. al l analog and digital blocks are shutdown. i 2 c bus inhibited. standby i 2 c communication with MMA8452Q is possible on vddio = high vdd = high active bit is cleared only digital blocks are enabled. analog subsystem is disabled. internal clocks disabled. active (wake/sleep) i 2 c communication with MMA8452Q is possible on vddio = high vdd = high active bit is set all blocks are enabled (digital, analog). sleep wake standby off active
MMA8452Q sensors freescale semiconductor, inc. 11 5 functionality the MMA8452Q is a low-power, digital out put 3-axis linear accelerometer with a i 2 c interface and embedded logic used to detect events and notify an external microprocessor over in terrupt lines. the functionality includes the following: ? 8-bit or 12-bit data which includes high-pass filtered data ? 4 different oversampling options for compromising between resolution and current consumption based on application requirements ? additional low-noise mode that functions independently of the oversampling modes for higher resolution ? low-power and auto-wake/sleep for conservation of current consumption ? single-/double-pulse with directional information 1 channel ? motion detection with directional information or freefall 1 channel ? transient detection based on a high-pass filter and settable threshold for detecting the change in acceleration above a threshold with directional information 1 channel ? portrait/landscape detection with trip points fixed at 30 and 60 for smooth transitions between orientations. all functionality is available in 2g, 4g or 8g dynamic ranges. there are many configuration settings for enabling all the diffe rent functions. separate application notes have been provided to help configure the device for each embedded functionality. table 8. features of the mma845xq devices feature list mma8451 mma8452 mma8453 digital resolution (bits) 14 12 10 digital sensitivity (counts/g) 4096 1024 256 data-ready interrupt yes yes yes single-pulse interrupt yes yes yes double-pulse interrupt yes yes yes directional-pulse interrupt yes yes yes auto-wake yes yes yes auto-sleep yes yes yes freefall interrupt yes yes yes 32 level fifo yes no no high-pass filter yes yes yes low-pass filter yes yes yes orientation detection portrait/landscape = 30, landscape to portrait = 60, and fixed 45 threshold yes yes yes programmable orientation detection yes no no motion interrupt with direction yes yes yes transient detection wi th high-pass filter yes yes yes low-power mode yes yes yes
MMA8452Q sensors 12 freescale semiconductor, inc. 5.1 device calibration the device interface is factory calibrated fo r sensitivity and zero-g offset for each axis. the trim values are stored in non volatile memory (nvm). on power-up, the trim parameters are read from nvm and applied to the circuitry. in normal use, further calibration in the end application is not necessary. however, the MMA8452Q allows the user to adjust the zero-g offset for each axis after power-up, changing the default offset values. the user offset adjustments are stored in 6 volatile registers. for mo re information on device calibration, refer to freescale application note, an4069 . 5.2 8-bit or 12-bit data the measured acceleration data is stored in the out_x_ msb, out_x_lsb, out_y_msb, out_y_lsb, out_z_msb, and out_z_lsb registers as 2?s complement 12-bit numbers. the most significant 8-bits of each axis are stored in out_x (y , z)_msb, so applications needing only 8-bit results can use these 3 registers and ignore out_x,y , z_lsb. to do this, the f_read bit in ctrl_reg1 must be set. when the f_read bit is cleared, the fast read mode is disabled. when the full-scale is set to 2g, the measurement range is -2g to +1.999g, and each count corresponds to 1g/1024 (1 mg) at 12-bits resolution. when the full-scale is set to 8g, the measurement range is -8g to +7.996g, and each count corresponds to 1g/256 (3.9 mg) at 12-bits resolution. the resolution is reduced by a factor of 16 if only the 8-bit results are used. for more information on the data manipulation between data formats and modes, refer to freescale application note, an4076. there is a device driver available that can be used with th e sensor toolbox demo board (lfstbeb8451, 2, 3q) with this application note. 5.3 low-power modes vs. high-resolution modes the MMA8452Q can be optimized for lower power modes or for higher resolution of the output data. high resolution is achieved by setting the lnoise bit in regist er 0x2a. this improves the resolution but be aware that the dy namic range is limite d to 4g when this bit is set. this will affect all internal fu nctions and reduce noise. another method for improving the resoluti on of the data is by oversampling. one of the ov ersampling schemes of the data can activated when mods = 10 in register 0x2b which will improve the resolution of the output data only. the highest resolution is achieved at 1.56 hz. there is a trade-off between low power and high resolution. low power can be achieved when the oversampling rate is reduced. when mods = 11 the lowest power is achieved. the lo west power is achieved when the sample rate is set to 1.56 hz. for more information on how to configure the MMA8452Q in low-power mode or high-resolution mode and to realize the benefits , refer to freescale app lication note, an4075. 5.4 auto-wake/sleep mode the MMA8452Q can be configured to transition between sample rates (with their respective current consumption) based on four of the interrupt functions of the device. the advantage of using the auto-wake/sl eep is that the syste m can automatically transition to a higher sample ra te (higher current consumption) when needed but spends t he majority of the time in the sleep mode (lower current) when the device does not require higher sampling rates. auto-w ake refers to the device being triggered by one of the interrupt functions to transition to a higher sample rate. this may also interrupt the processor to transition from a sleep mode to a higher power mode. sleep mode occurs after the accelerometer ha s not detected an in terrupt for longer than the us er definable ti me-out period. the device will transition to the specified lower sample rate. it may also alert the processor to go into a lower power mode to save on current during this period of inactivity. the interrupts that can wake the device from sleep are the following: pulse detection, orientation detection, motion/freefall, and transient detection. refer to an4074, for more detailed information for configuring the auto-wake/sleep. 5.5 freefall and motion detection MMA8452Q has flexible interrupt architecture for detecting either a freefall or a motion. freefall can be enabled where the set threshold must be less than the configured threshold, or motion can be enabled where the set threshold must be greater than the threshold. the motion configuration has the option of enabli ng or disabling a high-pass filter to eliminate tilt data (stat ic offset). the freefall does not use the high-pass filt er. for details on the freefall and motion detection with specific application exam ples and recommended configuration settings, refe r to freescale application note an4070. 5.5.1 freefall detection the detection of ?freefall? involv es the monitoring of the x, y , and z axes for the condition where the acceleration magnitude is below a user specified threshold for a user definable amount of time. normally the usable threshold ranges are between 100 mg and 500 mg.
MMA8452Q sensors freescale semiconductor, inc. 13 5.5.2 motion detection motion is often used to simply alert the main processor that the device is currently in use. when the acceleration exceeds a set threshold the motion interrupt is asserted. a motion can be a fast moving shake or a slow moving tilt. this will depend on the threshold and timing values configured for the event. the motion detection function can analyze static acceleration changes or faster jolts. for example, to detect that an object is spinni ng, all three axes would be enabled with a threshold detection of > 2g. this condition would need to occur for a minimum of 100 ms to ensu re that the event wasn't just noise. the timing value is set by a configurable debounce counter. the debounce counter acts like a filter to determine whether the condition exists for configurable set of time (i.e., 100 ms or longer). there is also directional data available in the source register to detect th e direction of the motion. this is useful for applications such as directional shake or flick, which assists with the algorithm f or various gesture detections. 5.6 transient detection the MMA8452Q has a built-in high-pass filter. acceleration data goes through the high-pass filter, eliminating the offset (dc) and low frequencies. the high-pass filter cutoff frequency can be set by the user to four different frequencies which are dependent on the output data rate (odr). a higher cutoff frequency ensures the dc data or slower moving data will be filtered out, allowing only the higher frequencies to pass. the embedded transient detection function uses the high-pass filtered data allowing the user to set the threshold and debounce counter. the transient detection feature c an be used in the same manner as the motion detection by bypassing the high-pass filter. there is an option in the configuratio n register to do this. this ad ds more flexibility to cover various customer use cases. many applications use the accelerometer?s static acceleration readings (i.e., tilt) which measure the change in acceleration due to gravity only. these functions benefit from acceleration data being filtered with a low-pass filter where high-frequency data is considered noise. however, there are many functions where the accelerometer must analyze dynamic acceleration. functions such as tap, flick, shake and step counting are based on the ana lysis of the change in the acceleration. it is simpler to inter pret these functions dependent on dynamic acceleration data when t he static component has been removed. the transient detection function can be routed to either interrupt pin through bit 5 in ctrl_reg5 register (0x2e). registers 0x1d ? 0x20 are the dedicated transient detection configuration registers. the source register contains directional data to determine the direction of the acceleration, either positive or negative. for details on t he benefits of the embedded transient detection function along w ith specific application examples and recomme nded configuration settings, please refer to freescale application note, an4071. 5.7 pulse detection the MMA8452Q has embedded single/double and directional pulse detection. this function has various customizing timers for setting the pulse time width and the latency time between pulses. there are programmable thresholds for all three axes. the pulse detection can be configured to run through the high-pass filter and also through a low-pass filter, which provides more customizing and tunable pulse-detection sc hemes. the status register provides u pdates on the axes where the event was detected and the direction of the tap. for more information on how to configure the device for pulse detection, please refer to freescale application note an4072. 5.8 orientation detection the MMA8452Q has an orientation detection algorithm with the abil ity to detect all 6 orientations. the transition from portrait to landscape is fixed with a 45 threshold angle and a 14 hyster esis angle. this allows the for a smooth transition from port rait to landscape at approximately 30 and then from landscape to portrait at approximately 60. the angle at which the device no longer detects the orientation change is referred to as the ?z-lockout angle?. the device operates down to 29 from the flat position. all angles are accurate to 2. for further information on the orientation detection f unction refer to freescale application note, an4068 . figure 8 shows the definitions of the trip an gles going from landscape to portrait (a) and then also from portrait to landscape (b).
MMA8452Q sensors 14 freescale semiconductor, inc. figure 7. landscape/portrait orientation figure 8. illustration of landscape to portrait tran sition (a) and portrait to landscape transition (b) figure 9 illustrates the z-angle lockout region. when lifting the device upright from the flat position it will be active for orientation detection as low as 29 from flat. . figure 9. illustration of z-tilt angle lockout transition top view pu earth gravity pin 1 xout @ 0g yout @ -1g zout @ 0g xout @ 1g yout @ 0g zout @ 0g xout @ 0g yout @ 1g zout @ 0g xout @ -1g yout @ 0g zout @ 0g ll pd lr side view front xout @ 0g yout @ 0g zout @ 1g back xout @ 0g yout @ 0g zout @ -1g portrait landscape to portrait 90 trip angle = 60 0 landscape portrait portrait to landscape 90 trip angle = 30 0 landscape (a) (b) upright normal 90 z-lock = 29 0 flat detection region lockout region
MMA8452Q sensors freescale semiconductor, inc. 15 5.9 interrupt register configurations there are six configurable interrupts in the MMA8452Q: data ready, mo tion/freefall, pulse, orientation, transient, and auto- sleep events. these six interrupt so urces can be routed to one of two interrupt pi ns. the interrupt source must be enabled and configured. if the event flag is asserted because the event cond ition is detected, the corresponding interrupt pin, int1 or int 2, will assert. figure 10. system interrupt generation block diagram 5.10 serial i 2 c interface acceleration data may be accessed through an i 2 c interface thus making the device particularly suitable for direct interfacing with a microcontroller. the MMA8452Q features an interrupt signal which indicates when a new set of measured acceleration data is available thus simplifying data sy nchronization in the digital system that us es the device. the MMA8452Q may also be configured to generate other interrupt signals accordingly to the programmable embedded functions of the device for motion, freefall, transient, orientation, and pulse. the registers embedded inside the mma8 452q are accessed through the i 2 c serial interface ( table 9 ). to enable the i 2 c interface, vddio line must be tied high (i.e., to the interface supply voltage). if v dd is not present and vddio is present, th e MMA8452Q is in off mode and communications on the i 2 c interface are ignored. the i 2 c interface may be used for communications between other i 2 c devices and the MMA8452Q does not affect the i 2 c bus. there are two signals associated with the i 2 c bus; the serial clock line (scl) and the serial data line (sda). the latter is a bidirectional line used for sending and receiving the data to/fro m the interface. external pullu p resistors connected to vddio are expected for sda and scl. when the bus is free both the lines are high. the i 2 c interface is compliant with fast mode (400 khz), and normal mode (100 khz) i 2 c standards ( table 5 ). table 9. serial interface pin description pin name pin description scl i 2 c serial clock sda i 2 c serial data sa0 i 2 c least significant bit of the device address interrupt controller data ready motion/freefall pulse orientation transient auto-sleep int enable int cfg int1 int2 66
MMA8452Q sensors 16 freescale semiconductor, inc. 5.10.1 i 2 c operation the transaction on the bus is started through a start condition (start) signal. start condition is defined as a high to low transition on the data line while the scl line is held high. af ter start has been transmitted by the master, the bus is conside red busy. the next byte of data transmitted after start contains the slave address in the first 7 bits, and the eighth bit tells wh ether the master is receiving data from the slave or transmitting data to the slave. when an address is sent, each device in the syst em compares the first seven bits after a start condition with its address. if they match, the device considers itself addressed by the master. the 9th clock pulse, following the slave address byte (and each subsequent byte) is the acknowledge (ack). the transmitter must release the sda line during the ack period. the receiver must then pull the data line low so that it remains stable low during the high period of the acknowledge clock period. a low to high transition on the sda line while the scl line is high is defined as a stop condition (stop). a data transfer is always terminated by a stop . a master may also issue a repeated start during a data transfer. the MMA8452Q expects repeated starts to be used to ran domly read from specific registers. the MMA8452Q's standard slave address is a choice between the two sequential addresses 0011100 and 0011101. the selection is made by the high- and low-logic level of the sa0 (pin 7) input respectively. the slave addresses are factory programmed and alternate addresses are available at customer request. the format is shown in ta b l e 1 0 . single byte read the MMA8452Q has an internal adc that can sample, convert and return sensor data on request. the transmission of an 8-bit command begins on the falling edge of scl. after the eight clock cycles are used to send the command, note that the data returned is sent with the msb first once the data is received. figure 11 shows the timing diagram for the accelerometer 8-bit i 2 c read operation. the master (or mcu) tran smits a start condition (st) to the MMA8452Q, slave address ($1d), with the r/w bit set to ?0? for a write, and the MMA8452Q sends an acknowledgement. then the master (or mcu) transmits the address of the register to read and the MMA8452Q sends an acknowledgement. the master (or mcu) transmits a repeated start condition (sr) and then addresses the MMA8452Q ($1d) with the r/w bit set to ?1 ? for a read from the previously selected register. the slave then acknowledges and transmits the data from the requested regi ster. the master does not acknowledge (nak) the transmitted data, but transmits a stop condition to end the data transfer. multiple byte read when performing a multi-byte read or ?b urst read?, the MMA8452Q aut omatically increments the received register address commands after a read command is received. therefore, after following the steps of a single byte read, multiple bytes of data can be read from sequential registers after each MMA8452Q ack nowledgment (ak) is received until a no acknowledge (nak) occurs from the master followed by a stop condition (sp) signaling an end of transmission. single byte write to start a write command, the master transmits a start condit ion (st) to the MMA8452Q, slave address ($1d) with the r/w bit set to ?0? for a write, the MMA8452Q sends an acknowledgement. then the master (mcu) transmits the address of the register to write to, and the MMA8452Q sends an acknowledgement. then t he master (or mcu) transmits the 8-bit data to write to the designated register and the MMA8452Q sends an acknowledgement that it has received the data. since this transmission is complete, the master transmits a stop condition (sp) to the data transfer. the data sent to the MMA8452Q is now stored in the appropriate register.
MMA8452Q sensors freescale semiconductor, inc. 17 multiple byte write the MMA8452Q automatically increments the received regist er address commands after a write command is received. therefore, after following the steps of a single byte write, multiple bytes of data can be written to sequential registers afte r each MMA8452Q acknowledgment (ack) is received. figure 11. i 2 c timing diagram table 10. i 2 c device address sequence command [7:2] device address [1] sa0 [7:1] device address r/w [7:0] 8-bit final value read 001110 0 0x1c 1 0x39 write 001110 0 0x1c 0 0x38 read 001110 1 0x1d 1 0x3b write 001110 1 0x1d 0 0x3a < single byte read > master st device address[6:0] w register address[7:0] sr device address[6:0] r nak sp slave ak ak ak data[7:0] < multiple byte read > master st device address[6:0] w register address[7:0] sr device address[6:0] r ak slave ak ak ak data[7:0] master ak ak nak sp slave data[7:0] data[7:0] data[7:0] < single byte write > master st device address[6:0] w register address[7:0] data[7:0] sp slave ak ak ak < multiple byte write > master st device address[6:0] w register address[7:0] data[7:0] data[7:0] sp slave ak ak ak ak legend st: start condition sp: stop condition nak: no acknowledge w: write = 0 sr: repeated start condition ak: acknowledge r: read = 1
MMA8452Q sensors 18 freescale semiconductor, inc. 6 register descriptions table 11. register address map name type register address auto-increment address default hex value comment f_read=0 f_read=1 status (1)(2) r 0x00 0x01 00000000 0x00 real time status out_x_msb (1)(2) r 0x01 0x02 0x03 output ? [7:0] are 8 msbs of 12-bit sample. out_x_lsb (1)(2) r 0x02 0x03 0x00 output ? [7:4] are 4 lsbs of 12-bit sample. out_y_msb (1)(2) r 0x03 0x04 0x05 output ? [7:0] are 8 msbs of 12-bit sample. out_y_lsb (1)(2) r 0x04 0x05 0x00 output ? [7:4] are 4 lsbs of 12-bit sample. out_z_msb (1)(2) r 0x05 0x06 0x00 output ? [7:0] are 8 msbs of 12-bit sample. out_z_lsb (1)(2) r 0x06 0x00 output ? [7:4] are 4 lsbs of 12-bit sample. reserved r 0x07 ? ? ? reserved. read return 0x00. reserved r 0x08 ? ? ? reserved. read return 0x00. sysmod r 0x0b 0x0c 00000000 0x00 current system mode int_source (1)(2) r 0x0c 0x0d 00000000 0x00 interrupt status who_am_i r 0x0d 0x0e 00101010 0x2a device id (0x2a) xyz_data_cfg (3)(4) r/w 0x0e 0x0f 00000000 0x00 hpf data out and dynamic range settings hp_filter_cutoff (3)(4) r/w 0x0f 0x10 00000000 0x00 cutoff frequency is set to 16 hz @ 800 hz pl_status (1)(2) r 0x10 0x11 00000000 0x00 landscape/portrait orientation status pl_cfg (3)(4) r/w 0x11 0x12 10000000 0x80 landscape/portrait configuration. pl_count (3)(4) r 0x12 0x13 00000000 0x00 landscape/portrait debounce counter pl_bf_zcomp (3)(4) r 0x13 0x14 01000100 0x44 back-front, z-lock trip threshold p_l_ths_reg (3)(4) r 0x14 0x15 10000100 0x84 portrait to landscape trip angle is 29 ff_mt_cfg (3)(4) r/w 0x15 0x16 00000000 0x00 freefall/motion functional block configuration ff_mt_src (1)(2) r 0x16 0x17 00000000 0x00 freefall/motion event source register ff_mt_ths (3)(4) r/w 0x17 0x18 00000000 0x00 freefall/motion threshold register ff_mt_count (3)(4) r/w 0x18 0x19 00000000 0x00 freefall/motion debounce counter reserved r 0x19 - 0x1c ? ? ? reserved. read return 0x00. transient_cfg r/w 0x1d 0x1e 00000000 0x00 transient functional block configuration transient_src (1)(2) r 0x1e 0x1f 00000000 0x00 transient event status register transient_ths (3)(4) r/w 0x1f 0x20 00000000 0x00 transient event threshold transient_count (3)(4) r/w 0x20 0x21 00000000 0x00 transient debounce counter pulse_cfg (3)(4) r/w 0x21 0x22 00000000 0x00 ele, double_xyz or single_xyz pulse_src (1)(2) r 0x22 0x23 00000000 0x00 ea, double_xyz or single_xyz pulse_thsx (3)(4) r/w 0x23 0x24 00000000 0x00 x pulse threshold pulse_thsy (3)(4) r/w 0x24 0x25 00000000 0x00 y pulse threshold pulse_thsz (3)(4) r/w 0x25 0x26 00000000 0x00 z pulse threshold pulse_tmlt (3)(4) r/w 0x26 0x27 00000000 0x00 time limit for pulse pulse_ltcy (3)(4) r/w 0x27 0x28 00000000 0x00 latency time for 2 nd pulse
MMA8452Q sensors freescale semiconductor, inc. 19 note : auto-increment addresses which are not a simple increment are highlighted in bold . the auto-increment addressing is only enabled when device registers are read using i 2 c burst read mode. therefore the internal storage of the auto-increment address is cleared whenever a stop condition is detected. 6.1 data registers the following are the data registers for the MMA8452Q. for mo re information on data manipulation of the MMA8452Q, refer to application note, an4076 . pulse_wind (3)(4) r/w 0x28 0x29 00000000 0x00 window time for 2nd pulse aslp_count (3)(4) r/w 0x29 0x2a 00000000 0x00 counter setting for auto-sleep ctrl_reg1 (3)(4) r/w 0x2a 0x2b 00000000 0x00 data rate, active mode ctrl_reg2 (3)(4) r/w 0x2b 0x2c 00000000 0x00 sleep enable, os modes, rst, st ctrl_reg3 (3)(4) r/w 0x2c 0x2d 00000000 0x00 wake from sleep, ipol, pp_od ctrl_reg4 (3)(4) r/w 0x2d 0x2e 00000000 0x00 interrupt enable register ctrl_reg5 (3)(4) r/w 0x2e 0x2f 00000000 0x00 interrupt pin (int1/int2) map off_x (3)(4) r/w 0x2f 0x30 00000000 0x00 x-axis offset adjust off_y (3)(4) r/w 0x30 0x31 00000000 0x00 y-axis offset adjust off_z (3)(4) r/w 0x31 0x0d 00000000 0x00 z-axis offset adjust reserved (do not modify) 0x40 ? 7f ? ? ? reserved. read return 0x00. 1. register contents are reset when transition from standby to active mode occurs. 2. this register data is only valid in active mode. 3. register contents are preserved when transit ion from active to standby mode occurs. 4. modification of this register?s contents can only occur when device is standby mode except ctrl_reg1 active bit and ctrl_reg2 rst bit. 0x00: status data status register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 zyxow zow yow xow zyxdr zdr ydr xdr table 12. status description zyxow x, y, z-axis data overwrite. default value: 0 0: no data overwrite has occurred 1: previous x, y, or z data was overwritten by new x, y, or z data before it was read zow z-axis data overwrite. default value: 0 0: no data overwrite has occurred 1: previous z-axis data was overwritten by new z-axis data before it was read yow y-axis data overwrite. default value: 0 0: no data overwrite has occurred 1: previous y-axis data was overwritten by new y-axis data before it was read xow x-axis data overwrite. default value: 0 0: no data overwrite has occurred 1: previous x-axis data was overwritten by new x-axis data before it was read zyxdr x, y, z-axis new data ready. default value: 0 0: no new set of data ready 1: a new set of data is ready zdr z-axis new data available. default value: 0 0: no new z-axis data is ready 1: a new z-axis data is ready ydr y-axis new data available. default value: 0 0: no new y-axis data ready 1: a new y-axis data is ready xdr x-axis new data available. default value: 0 0: no new x-axis data ready 1: a new x-axis data is ready table 11. register address map
MMA8452Q sensors 20 freescale semiconductor, inc. zyxow is set whenever a new acceleration data is produced before completing the retrieval of the previous set. this event occurs when the content of at least one acceleration data register (i.e., out_x, out_y , out_z) has been overwritten. zyxow is cleared when the high-bytes of the acceleration data (out _x_msb, out_y_msb, out_z_msb) of all the active channels are read. zow is set whenever a new acceleration sample related to the z-axis is generated before the retrieval of the previous sample. when this occurs the previous sample is overwritten. zow is cleared anytime out_z_msb register is read. yow is set whenever a new acceleration sample related to the y-axis is generated before the retrieval of the previous sample. when this occurs the previous sample is overwritten. yow is cleared anytime out_y_msb register is read. xow is set whenever a new acceleration sample related to the x-axis is generated before the retrieval of the previous sample. when this occurs the previous sample is overwritten. xow is cleared anytime out_x_msb register is read. zyxdr signals that a new sample for any of the enabled channels is available. zyxdr is clear ed when the high-bytes of the acceleration data (out_x_msb, out_y_msb, out_z_msb) of all the enabled channels are read. zdr is set whenever a new acceleration sample related to the z-axis is generated. zdr is cleared anytime out_z_msb register is read. ydr is set whenever a new acceleration sample related to the y-ax is is generated. ydr is cleared anytime out_y_msb register is read. xdr is set whenever a new acceleration sample related to the x-ax is is generated. xdr is cleared anytime out_x_msb register is read. data registers: 0x01: out_x_msb, 0x02: out_x_lsb, 0x03: out_y_msb, 0x04: out_y_lsb, 0x05: out_z_msb, 0x06: out_z_lsb these registers contain the x-axis, y-axis, and z-axis 12-bit output sample data expressed as 2's complement numbers. the sample data output registers store the current sample data. out_x_msb, out_x_lsb, out_y_msb, out_y_lsb, out_z_m sb, and out_z_lsb are stored in the auto- incrementing address range of 0x01 to 0x06 to reduce reading the status followed by 12-bit axis data to 7 bytes. if the f_read bit is set (0x2a bit 1), auto-increment will skip over ls b registers. this will short en the data acquisition from 7 bytes to 4 bytes. the lsb registers can only be read immedi ately following the read access of the corresponding msb register. a random read access to the lsb registers is not possible. r eading the msb register and then the lsb register in sequence ensures that both bytes (lsb and msb) belong to the same data sample, even if a new data sample arrives between reading the msb and the lsb byte. 0x0b: sysmod system mode register the system mode register indicates the current device operating mode. applications using the auto-sleep/w ake mechanism should use this register to syn chronize the application with the device operating mode transitions. 0x01: out_x_msb: x_msb register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 xd11 xd10 xd9 xd8 xd7 xd6 xd5 xd4 0x02: out_x_lsb: x_lsb register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 x d 3x d 2x d 1x d 00000 0x03: out_y_msb: y_msb register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 yd11 yd10 yd9 yd8 yd7 yd6 yd5 yd4 0x04: out_y_lsb: y_lsb register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 y d 3y d 2x d 1x d 00000 0x05: out_z_msb: z_msb register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 zd11 zd10 zd9 zd8 zd7 zd6 zd5 zd4 0x06: out_z_lsb: z_lsb register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 z d 3z d 2z d 1z d 0 0 0 0 0 0x0b: sysmod: system mode register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 0 0 0 0 0 sysmod1 sysmod0
MMA8452Q sensors freescale semiconductor, inc. 21 0x0c: int_source system interrupt status register in the interrupt source register the status of the various em bedded features can be determined. the bits that are set (logic ?1 ?) indicate which function has asserted an interrupt and conversely the bits that are cleared (logic ?0?) indicate which function has not asserted or has deasserted an interrupt. the bits are set by a low to high transition and are cleared by reading the appropriate interrupt source register. the src_drdy bit is cleared by reading the x, y and z data. it is not cleared by simply reading the status register (0x00). table 13. sysmod description sysmod[1:0] system mode. default value: 00. 00: standby mode 01: wake mode 10: sleep mode 0x0c: int_source: system interrupt status register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 src_aslp 0 src_trans src_lndprt src_pulse src_ff_mt 0 src_drdy table 14. int_source description int_source description src_aslp auto-sleep/wake interrupt status bit. default value: 0. logic ?1? indicates that an interrupt event that can cause a wake to sleep or sleep to wake system mode transition has occurred. logic ?0? indicates that no wake to sleep or sleep to wa ke system mode transition interrupt event has occurred. wake to sleep transition occurs when no interrupt occurs for a ti me period that exceeds the user specified limit (aslp_count). this causes the system to transition to a user specified low odr setting. sleep to wake transition occurs when the user specified interrup t event has woken the system; thus causing the system to transition to a user specified high odr setting. reading the sysmod register clears the src_aslp bit. src_trans transient interrupt status bit. default value: 0. logic ?1? indicates that an acceleration trans ient value greater than user specified threshold has occurred. logic ?0? indicates that no transient event has occurred. this bit is asserted whenever ? ea? bit in the trans_src is asserted and the interrupt has been enabled. this bit is cleared by reading the trans_src register. src_lndprt landscape/portrait orientation interrupt status bit. default value: 0. logic ?1? indicates that an interrupt was generated due to a c hange in the device orientation status. logic ?0? indicates that no change in orientation status was detected. this bit is asserted whenever ? newlp ? bit in the pl_status is asserted and the interrupt has been enabled. this bit is cleared by reading the pl_status register. src_pulse pulse interrupt status bit. default value: 0. logic ?1? indicates that an interrupt was generated due to si ngle and/or double pulse event. logic ?0? indicates that no pulse event was detected. this bit is asserted whenever ?ea? bit in the pu lse_src is asserted and the interrupt has been enabled. this bit is cleared by reading the pulse_src register. src_ff_mt freefall/motion interrupt status bit. default value: 0. logic ?1? indicates that the freefall/motion function interrupt is active. logic ?0? indicates that no freefall or motion event was detected. this bit is asserted whenever ?ea? bit in the ff_mt_sr c register is asserted and the ff_mt interrupt has been enabled. this bit is cleared by reading the ff_mt_src register. src_drdy data ready interrupt bit status. default value: 0. logic ?1? indicates that the x, y, z data ready interrupt is active indicating the presence of new data and/or data overrun. otherwise if it is a logic ?0? the x, y, z interrupt is not active. this bit is asserted when the zyxow and/or zyxdr is set and the interrupt has been enabled. this bit is cleared by reading the x, y, and z data.
MMA8452Q sensors 22 freescale semiconductor, inc. 0x0d: who_am_i device id register the device identification register identifie s the part. the default value is 0x2a. this value is factory programmed. consult th e factory for custom alternate values. 0x0e: xyz_data_cfg register the xyz_data_cfg register sets the dynamic range and sets the high-pass filter for the output data. when the hpf_out bit is set. the data registers 0x01 - 0x06 will contain high-pass filtered data when this bit is set. the default full scale value range is 2g and the high-pass filter is disabled. 0x0f: hp_filter_cutoff high-pass filter register this register sets the high-pass filter cu toff frequency for removal of the offset and slower changing acceleration data. the output of this filter is indi cated by the data registers (0x01-0x06) when bit 4 (h pf_out) of register 0x0e is set. the filter c utoff options change based on the data rate selected as shown in table 18 . for details of implementation on the high-pass filter, refer to freescale application note an4071. 0x0d: who_am_i device id register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 00101 0 1 0 0x0e: xyz_data_cfg (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 000h p f _ o u t0 0 f s 1 f s 0 table 15. xyz data configuration descriptions hpf_out enable high-pass output data 1 = output data high-pass filtered. default value: 0 fs[1:0] output buffer data format full scale. default value: 00 (2g). table 16. full scale range fs1 fs0 full scale range 00 2 01 4 10 8 11 r e s e r v e d 0x0f: hp_filter_cutoff: high-pass filter register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 0 pulse_hpf_byp pulse_lpf_en 0 0 sel1 sel0 table 17. high-pass filter cu toff register descriptions pulse_hpf_byp bypass high-pass filter for pulse processing function. 0: hpf enabled for pulse processing, 1: hpf bypassed for pulse processing default value: 0. pulse_lpf_en enable low-pass filter for pulse processing function. 0: lpf disabled for pulse processing , 1: lpf enabled for pulse processing default value: 0. sel[1:0] hpf cutoff frequency selection. default value: 00 (see table 18 ).
MMA8452Q sensors freescale semiconductor, inc. 23 6.2 portrait/ landscape embedded function registers for more details on the meaning of the different user configurable settings and for ex ample code refer to freescale application note an4068. 0x10: pl_status portrait/landscape status register this status register can be read to get updated information on any change in orientation by reading bit 7, or on the specifics of the orientation by reading the other bits. for further understanding of portrait up, portrait down, landscape left, landscap e right, back and front orientations please refer to figure 3 . the interrupt is cleared when reading the pl_status register. newlp is set to 1 after the first orientation detection after a standby to active transition, and whenever a change in lo, bafro, or lapo occurs. newlp bit is clear ed anytime pl_status register is read. the orientation mechanism state change is limited to a maximum 1.25g. lapo bafro and lo continue to change when newlp is set. the current position is locked if the absolute value of the acceleration experienced on any of the three axes is greater than 1.25g. table 18. high-pass fi lter cutoff options oversampling mode = normal sel1 sel0 800 hz 400 hz 200 hz 100 hz 50 hz 12.5 hz 6.25 hz 1.56 hz 0 0 16 hz 16 hz 8 hz 4 hz 2 hz 2 hz 2 hz 2 hz 0 1 8 hz 8 hz 4 hz 2 hz 1 hz 1 hz 1 hz 1 hz 1 0 4 hz 4 hz 2 hz 1 hz 0.5 hz 0.5 hz 0.5 hz 0.5 hz 1 1 2 hz 2 hz 1 hz 0.5 hz 0.25 hz 0.25 hz 0.25 hz 0.25 hz oversampling mode = low noise low power 0 0 16 hz 16 hz 8 hz 4 hz 2 hz 0.5 hz 0.5 hz 0.5 hz 0 1 8 hz 8 hz 4 hz 2 hz 1 hz 0.25 hz 0.25 hz 0.25 hz 1 0 4 hz 4 hz 2 hz 1 hz 0.5 hz 0.125 hz 0.125 hz 0.125 hz 1 1 2 hz 2 hz 1 hz 0.5 hz 0.25 hz 0.063 hz 0.063 hz 0.063 hz oversampling mode = high resolution 0 0 16 hz 16 hz 16 hz 16 hz 16 hz 16 hz 16 hz 16 hz 0 1 8hz 8hz 8hz 8hz 8hz 8hz 8hz 8hz 1 0 4hz 4hz 4hz 4hz 4hz 4hz 4hz 4hz 1 1 2 hz 2 hz 2 hz 2 hz 2 hz 2 hz 2 hz 2 hz oversampling mode = low power 0 0 16 hz 8 hz 4 hz 2 hz 1 hz 0.25 hz 0.25 hz 0.25 hz 0 1 8 hz 4 hz 2 hz 1 hz 0.5 hz 0.125 hz 0.125 hz 0.125 hz 1 0 4 hz 2 hz 1 hz 0.5 hz 0.25 hz 0.063 hz 0.063 hz 0.063 hz 1 1 2 hz 1 hz 0.5 hz 0.25 hz 0.125 hz 0.031 hz 0.031 hz 0.031 hz 0x10: pl_status register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 newlp lo 0 0 0 lapo[1] lapo[0] bafro table 19. pl_status register description newlp landscape/portrait status change flag. default value: 0. 0: no change, 1: bafro and/or lapo and/or z-tilt lockout value has changed lo z-tilt angle lockout. default value: 0. 0: lockout condition has not been detected. 1: z-tilt lockout trip angle has been exceeded. lockout has been detected. lapo[1:0] (1) 1. the default power up state is bafro = 0, lapo = 0, and lo = 0. landscape/portrait orientation. default value: 00 00: portrait up: equipment standing vertically in the normal orientation 01: portrait down: equipment standing vertically in the inverted orientation 10: landscape right: equipment is in landscape mode to the right 11: landscape left: equipment is in landscape mode to the left. bafro back or front orientation. default value: 0 0: front: equipment is in the front facing orientation. 1: back: equipment is in the back facing orientation.
MMA8452Q sensors 24 freescale semiconductor, inc. 0x11: portrait/landscape configuration register this register enables the portrait/landscape function and sets the behavior of the debounce counter. 0x12: portrait/landscape debounce counter this register sets the debounce count for the orientation state transition. the minimum debounce latency is determined by the data rate set by the product of the selected system odr and pl_c ount registers. any transition from wake to sleep or vice versa resets the internal landscape/portrait debounce counter. note: the debounce counter weighting (time step) changes based on the odr and the oversampling mode. table 22 explains the time step value for all sample rates and all oversampling modes. 0x13: pl_bf_zcomp back/front and z compensation register the z-lock angle compensation is set to 29. the back to front trip angle is set to 75. note: all angles are accurate to 2. 0x11: pl_cfg register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 dbcntm pl_en 0 0 0 0 0 0 table 20. pl_cfg description dbcntm debounce counter mode selection. default value: 1 0: decrements debounce whenever condition of interest is no longer valid. 1: clears counter whenever conditi on of interest is no longer valid. pl_en portrait/landscape detection enable. default value: 0 0: portrait/landscape detection is disabled. 1: portrait/landscape detection is enabled. 0x12: pl_count register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 dbnce[7] dbnce[6] dbnce[5] dbnce[4] dbnce[3] dbnce[2] dbnce[1] dbnce[0] table 21. pl_count description dbcne[7:0] debounce count value. default value: 0000_0000. table 22. pl_count relationship with the odr odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.319 0.319 0.319 0.319 1.25 1.25 1.25 1.25 400 0.638 0.638 0.638 0.638 2.5 2.5 2.5 2.5 200 1.28 1.28 0.638 1.28 5 5 2.5 5 100 2.55 2.55 0.638 2.55 10 10 2.5 10 50 5.1 5.1 0.638 5.1 20 20 2.5 20 12.5 5.1 20.4 0.638 20.4 20 80 2.5 80 6.25 5.1 20.4 0.638 40.8 20 80 2.5 160 1.56 5.1 20.4 0.638 40.8 20 80 2.5 160 0x13: pl_bf_zcomp register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 bkfr[1] bkfr[0] 0 0 0 zlock[2] zlock[1] zlock[0] table 23. pl_bf_zcomp description bkfr[1:0] back front trip angle fixed threshold = 01 which is 75. zlock[2:0] z-lock angle fixed threshold = 100 which is 29.
MMA8452Q sensors freescale semiconductor, inc. 25 0x14: p_l_ths_reg portrait/landscape threshold and hysteresis register this register represents the portrait to landscape trip threshold. : 6.3 motion and freefall embedded function registers the freefall/motion function can be configured in ei ther freefall or motion detection mode via the oae configuration bit (0x15 bit 6). the freefall/motion detection block can be disabled by setting all three bits zefe, yefe, and xefe to zero. depending on the register bits ele (0x15 bit 7) and oae (0x15 bit 6), each of the freefall and motion detection block can operate in four different modes: mode 1: freefall detectio n with ele = 0, oae = 0 in this mode, the ea bit (0x16 bit 7) indicates a freefall event after the debounce counter is complete. the zefe, yefe, and xefe control bits determine which axes are considered for the fr eefall detection. once the ea bit is set, and dbcntm = 0, the ea bit can get cleared only after the delay specified by ff_mt_co unt. this is because the counter is in decrement mode. if dbcntm = 1, the ea bit is cleared as soon as the freefall condition disappears, and will not be set again before the delay specified by ff_mt_count has passed. reading the ff_mt_src register does not clear the ea bit. the event flags (0x16) zhe, zhp, yhe, yhp, xhe, and xhp reflect the motion detect ion status (i.e. high-g event) without any debouncing, provided that the corresponding bits zefe, yefe, and/or xefe are set. mode 2: freefall detectio n with ele = 1, oae = 0 in this mode, the ea event bit indicates a freefall event after the debo unce counter. once the de bounce counter reaches the time value for the set threshold, the ea bit is set, and rema ins set until the ff_mt_src regist er is read. when the ff_mt_src register is read, the ea bit and the debounce counter are cleared and a new event can only be generated after the delay specifi ed by ff_mt_cnt. the zefe, yefe, and xefe control bits determi ne which axes are considered for the freefall detection. while ea = 0, the event flags zhe, zhp, yhe, yh p, xhe, and xhp reflect the motion detectio n status (i.e., high-g event) without any debouncing, provided that the corresponding bits zefe, yefe, and /or xefe are set. the event flag s zhe, zhp, yhe, yhp, xhe, and xhp are latched when the ea event bit is set. the event flags zhe, zhp, yhe, yhp, xhe, and xhp will start changing only after the ff_mt_src r egister has been read. mode 3: motion detectio n with ele = 0, oae = 1 in this mode, the ea bit indicates a motion event after the debounce counter time is reached. the zefe, yefe, and xefe control bits determine which axes are taken into consideration for motion detection. once the ea bit is set, and dbcntm = 0, the ea bit can get cleared only after the delay specified by ff_mt_count. if dbcntm = 1, the ea bit is cleared as soon as the motion high-g condition disappears. the event flags zhe, zhp, yhe, yh p, xhe, and xhp reflect th e motion detection status (i.e., high-g event) without any debouncing, provided that the corresponding bits zefe, yefe, and/or xefe are set. reading the ff_mt_src does not clear any flags, nor is the debounce counter reset. mode 4: motion detectio n with ele = 1, oae = 1 in this mode, the ea bit indicates a motion event after deboun cing. the zefe, yefe, and xefe control bits determine which axes are taken into consideration for motion detection. once the debounce counter reaches the threshold, the ea bit is set, and remains set until the ff_mt_src regi ster is read. when the ff_mt_src register is read, all register bits are cleared and the debounce counter are cleared and a new event can only be gener ated after the delay specified by ff_mt_cnt. while the bit ea is zero, the event flags zhe, zhp, yhe, yhp, xhe, and xhp re flect the motion detection status (i.e., high-g event) without any debouncing, provided that the corresponding bits zefe, yefe, and/or xefe are set. when the ea bit is set, these bits keep their current value until the ff_mt_src register is read. 0x14: p_l_ths_reg register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 p_l_ths[4] p_l_ths[3] p_l_ths[2] p_l_ths[1] p_l_ths[0] hys[2] hys[1] hys[0] table 24. p_l_ths_reg description p_l_ths[7:3] portrait/landscape fixed threshold angle = 1_0000 (45). hys[2:0] this is a fixed angle added to the thres hold angle for a smoother transition from portrait to landscape and landscape to portrait. this angle is fixed at 14, which is 100. table 25. trip angles with hysteresis for 45 angle hysteresis register value hysteresis angle range landscape to portrait trip angle portrait to landscape trip angle 4 14 59 31
MMA8452Q sensors 26 freescale semiconductor, inc. 0x15: ff_mt_cfg freefall/motion configuration register this is the freefall/motion configurat ion register for setting up the conditio ns of the freefall or motion function. oae bit allows the selection between motion (logical or comb ination) and freefall (logical and combination) detection. ele denotes whether the enabled event flag will to be latched in the ff_mt_src regist er or the event flag status in the ff_mt_src will indicate the real-time status of the event. if ele bit is set to a logic ?1?, then the event flags are frozen wh en the ea bit gets set, and are cleared by reading the ff_mt_src source register. zhfe, yefe, xefe enable the detection of a motion or freefall event when the measured acceleration data on x, y, z channel is beyond the threshold set in ff_mt_ths register. if the ele bit is set to logic ?1? in the ff_mt_cfg register new event flags are blocked from updating the ff_mt_src register. ff_mt_ths is the threshold register used to detect freefall motion events. the unsigned 7-bit ff_mt_ths threshold register holds the threshold for the freefall detection where the magnitude of the x and y and z acceleration values is lower or equal t han the threshold value. conversely, the ff_mt_ths also holds the threshold for the motion detection where the magnitude of the x or y or z acceleration value is higher than the threshold value. figure 12. ff_mt_cfg high- and low-g level 0x16: ff_mt_src freefall/motion source register 0x15: ff_mt_cfg register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ele oae zefe yefe xefe 0 0 0 table 26. ff_mt_cfg description ele event latch enable: event flags are latched into ff_mt_src re gister. reading of the ff_mt_src register clears the event flag ea and all ff_mt_src bits. default value: 0. 0: event flag latch disabled ; 1: event flag latch enabled oae motion detect / freefall detect flag select ion. default value: 0. (freefall flag) 0: freefall flag (logical and combination) 1: motion flag (logical or combination) zefe event flag enable on z default value: 0. 0: event detection disabled; 1: ra ise event flag on measured accelera tion value beyond preset threshold yefe event flag enable on y event. default value: 0. 0: event detection disabled; 1: ra ise event flag on measured acceleration value beyond preset threshold xefe event flag enable on x event. default value: 0. 0: event detection disabled; 1: ra ise event flag on measured accelera tion value beyond preset threshold 0x16: ff_mt_src freefall and motion source register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ea 0 zhe zhp yhe yhp xhe xhp +8g high-g + threshold (motion) low-g threshold (freefall) high-g - threshold (motion) -8g x, y, z high-g region x, y, z high-g region x, y, z low-g region negative positive acceleration acceleration
MMA8452Q sensors freescale semiconductor, inc. 27 this register keeps track of the acceleration event which is triggering (or has triggered, in case of ele bit in ff_mt_cfg register being set to 1) the event flag. in particular ea is set to a logic ?1? when the logical combination of acceleration ev ents flags specified in ff_mt_cfg register is true. this bit is used in combination with the values in int_en_ff_mt and int_cfg_ff_mt register bits to gene rate the freefall/motion interrupts. an x,y, or z motion is true when the acce leration value of the x or y or z channel is higher than the preset threshold value defined in the ff_mt_ths register. conversely an x, y, and z low event is true when the acceleration value of the x and y and z channel is lower than or equal to the preset threshold value defined in the ff_mt_ths register. 0x17: ff_mt_ths freefall and motion threshold register the threshold resolution is 0.063g/lsb and the threshold regist er has a range of 0 to 127 counts. the maximum range is to 8g. note that even when the full scale value is set to 2g or 4g the motion detects up to 8g. if the low-noise bit is set in reg ister 0x2a then the maximum threshold will be limited to 4g regardless of the full scale range. dbcntm bit configures the way in which the debounce counter is reset when the inertial event of interest is momentarily not true. when dbcntm bit is a logic ?1?, the debounce counter is cleared to 0 whenever the inertial event of interest is no longer true as shown in figure 13 , (b). while the dbcntm bit is set to logic ?0? th e debounce counter is decremented by 1 whenever the inertial event of interest is no longer true ( figure 13 , (c)) until the debounce counter reaches 0 or the inertial event of interest becomes active. decrementing the de bounce counter acts as a median en abling the system to filter out irre gular spurious ev ents which might impede the detection of inertial events. table 27. freefall/motion source description ea event active flag. default value: 0. 0: no event flag has been asserted; 1: one or more event flag has been asserted. see the description of the oae bit to determine the effect of the 3-axis event flags on the ea bit. zhe z motion flag. default value: 0. 0: no z motion event detected, 1: z motion has been detected this bit reads always zero if the zefe control bit is set to zero zhp z motion polarity flag. default value: 0. 0: z event was positive g, 1: z event was negative g this bit read always zero if the zefe control bit is set to zero yhe y motion flag. default value: 0. 0: no y motion event detected, 1: y motion has been detected this bit read always zero if the yefe control bit is set to zero yhp y motion polarity flag. default value: 0 0: y event detected was positive g, 1: y event was negative g this bit reads always zero if the yefe control bit is set to zero xhe x motion flag. default value: 0 0: no x motion event detected, 1: x motion has been detected this bit reads always zero if the xefe control bit is set to zero xhp x motion polarity flag. default value: 0 0: x event was positive g, 1: x event was negative g this bit reads always zero if the xefe control bit is set to zero 0x17: ff_mt_ths register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 dbcntm ths6 ths5 ths4 ths3 ths2 ths1 ths0 table 28. ff_mt_ths description dbcntm debounce counter mode selection. default value: 0. 0: increments or decrements debounce, 1: increments or clears counter. ths[6:0] freefall /motion threshold: default value: 000_0000.
MMA8452Q sensors 28 freescale semiconductor, inc. 0x18: ff_mt_count debounce register this register sets the number of deboun ce sample counts for the event trigger. this register sets the minimum number of debounce sample c ounts of continuously matching the detection condition user selected for the freefall, motion event. when the internal debounce counter reaches the ff_mt_count value a freefall/motion event flag is set. the debounce counter will never increase beyond the ff_mt_count value. time step used for the debounce sample count depends on the odr chosen and the oversampling mode as shown in table 30 . 0x18: ff_mt_count_register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 d7 d6 d5 d4 d3 d2 d1 d0 table 29. ff_mt_count description d[7:0] count value. default value: 0000_0000 table 30. ff_mt_count relationship with the odr odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.319 0.319 0.319 0.319 1.25 1.25 1.25 1.25 400 0.638 0.638 0.638 0.638 2.5 2.5 2.5 2.5 200 1.28 1.28 0.638 1.28 5 5 2.5 5 100 2.55 2.55 0.638 2.55 10 10 2.5 10 50 5.1 5.1 0.638 5.1 20 20 2.5 20 12.5 5.1 20.4 0.638 20.4 20 80 2.5 80 6.25 5.1 20.4 0.638 40.8 20 80 2.5 160 1.56 5.1 20.4 0.638 40.8 20 80 2.5 160
MMA8452Q sensors freescale semiconductor, inc. 29 figure 13. dbcntm bit function high-g event on count threshold ff ffea all 3-axis (motion detect) counter value high-g event on count threshold debounce (a) all 3-axis (motion detect) counter value high-g event on count threshold debounce ea all 3-axis (motion detect) counter value dbcntm = 1 (b) ea dbcntm = 0 (c)
MMA8452Q sensors 30 freescale semiconductor, inc. 6.4 transient (hpf) acceleration detection for more information on the uses of the tr ansient function please review application note an4071. this function is similar to the motion detection except that high-pa ss filtered data is compared. there is an op tion to disable the high-pass filter throug h the function. in this case the behavior is the same as the motion de tection. this allows for the device to have 2 motion detection functions. 0x1d: transient_cfg register the transient detection mechanism can be configured to raise an interrupt when the magnitude of the hi gh-pass filtered acceleration threshold is exceeded. the transient_cfg regist er is used to enable the transient interrupt generation mechanism for the 3 axes (x, y, z) of acceleration. there is al so an option to bypass the high-pass filter. when the high-pass filter is bypassed, the function behaves similar to the motion detection. 0x1e: transient_src register the transient source register provides the status of the enabled axes and the polarity (directional) information. when this register is read it clears the in terrupt for the transient detectio n. when new events arrive while ea = 1, additional *transe b its may get set, and the corresponding *_trans_pol flag become updated. however no *transe bit may get cleared before the transient_src register is read. when the ea bit gets set while ele = 1, all other status bits get frozen at their current state. by reading the transient_src register, all bits get cleared. 0x1d: transient_cfg register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 0 0 ele ztefe ytefe xtefe hpf_byp table 31. transient_cfg description ele transient event flags are latched into the transient_src regist er. reading of the transient_src register clears the event flag. default value: 0. 0: event flag latch disabled; 1: event flag latch enabled ztefe event flag enable on z transient acceleration greater than transient threshold event. default value: 0. 0: event detection disabled; 1: raise event flag on measur ed acceleration delta value greater than transient threshold. ytefe event flag enable on y transient acceleration greater than transient threshold event. default value: 0. 0: event detection disabled; 1: raise event flag on measur ed acceleration delta value greater than transient threshold. xtefe event flag enable on x transient acceleration greater than transient threshold event. default value: 0. 0: event detection disabled; 1: raise event flag on measur ed acceleration delta value greater than transient threshold. hpf_byp bypass high-pass filter default value: 0. 0: data to transient acceleration detecti on block is through hpf 1: data to transient acceleration detection block is not throu gh hpf (similar to motion detection function) 0x1e: transient_src register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 ea ztranse z_trans_pol ytranse y _trans_pol xtranse x_trans_pol table 32. transient_src description ea event active flag. default value: 0. 0: no event flag has been asserted; 1: one or more event flag has been asserted. ztranse z transient event. default value: 0. 0: no interrupt, 1: z transient acceleration greater than the value of transient_ths event has occurred z_trans_pol polarity of z transient event that triggered interrupt. default value: 0. 0: z event was positive g, 1: z event was negative g ytranse y transient event. default value: 0. 0: no interrupt, 1: y transient acceleration greater than the value of transient_ths event has occurred y_trans_pol polarity of y transient event that triggered interrupt. default value: 0. 0: y event was positive g, 1: y event was negative g xtranse x transient event. default value: 0. 0: no interrupt, 1: x transient acceleration greater than the value of transient_ths event has occurred x_trans_pol polarity of x transient event that triggered interrupt. default value: 0. 0: x event was positive g, 1: x event was negative g
MMA8452Q sensors freescale semiconductor, inc. 31 0x1f: transient_ths register the transient threshold register sets the threshold limit for the detection of the transient acceleration. the value in the transient_ths register corresponds to a g value which is comp ared against the values of high-pass filtered data. if the high- pass filtered acceleration value exceeds the threshold limit an event flag is raised and the interrupt is generated if enabled. the threshold ths[6:0] is a 7-bit unsigned number, 0.063g/lsb. the maximum threshold is 8g. even if the part is set to full scale at 2g or 4g this function will still operate up to 8g. if the low-noise bit is set in register 0x2a the maximum threshold to be reached is 4g. note: if configuring the transient detection threshold for less than 1g, the high-pass f ilter will need some settling time. the sett ling time will vary depending on selected odr, high-pass frequency cuto ff and threshold. for more information, please refer to freescale application note, an4071. 0x20: transient_count the transient_count sets the minimum number of debounc e counts continuously matchi ng the condition where the unsigned value of high-pass filtered data is greater than the user specified value of transient_ths. the time step for the transient detection debounce counter is set by the value of the system odr and the oversampling mode. 0x1f: transient_ths register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 dbcntm ths6 ths5 ths4 ths3 ths2 ths1 ths0 table 33. transient_ths description dbcntm debounce counter mode selection. default value: 0. 0: increm ents or decrements debounce; 1: increments or clears counter. ths[6:0] transient threshold: default value: 000_0000. 0x20: transient_count register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 d7 d6 d5 d4 d3 d2 d1 d0 table 34. transient_count description d[7:0] count value. default value: 0000_0000 . table 35. transient_count re lationship with the odr odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.319 0.319 0.319 0.319 1.25 1.25 1.25 1.25 400 0.638 0.638 0.638 0.638 2.5 2.5 2.5 2.5 200 1.28 1.28 0.638 1.28 5 5 2.5 5 100 2.55 2.55 0.638 2.55 10 10 2.5 10 50 5.1 5.1 0.638 5.1 20 20 2.5 20 12.5 5.1 20.4 0.638 20.4 20 80 2.5 80 6.25 5.1 20.4 0.638 40.8 20 80 2.5 160 1.56 5.1 20.4 0.638 40.8 20 80 2.5 160
MMA8452Q sensors 32 freescale semiconductor, inc. 6.5 single, double and directional pulse-detection registers for more details of how to configure the pulse detection and sa mple code please refer to freescale application note, an4072. the pulse-detection registers are referred to as ?pulse?. 0x21: pulse_cfg pulse configuration register this register configures the event flag for the pulse detection for enabling/disabling the detection of a single and double pul se on each of the axes. 0x22: pulse_src pulse source register this register indicates a double or single pulse event has occurred and also which direction. the corresponding axis and event must be enabled in register 0x21 for the event to be seen in the source register. when the ea bit gets set while ele = 1, all status bits (axz , axy, axz, dpe, and polx, po ly, polz) are frozen. reading the pulse_src register clears all bits. reading the source register will clear the interrupt. 0x21: pulse_cfg register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 dpa ele zdpefe zspefe ydpefe yspefe xdpefe xspefe table 36. pulse_cfg description dpa double pulse abort. default value: 0. 0: double pulse detection is not aborted if the start of a pulse is detected during t he time period specified by the pulse_ltcy register. 1: setting the dpa bit momentarily suspends the double pulse detecti on if the start of a pulse is detected during the time peri od specified by the pulse_ltcy register and the pulse ends before t he end of the time period specified by the pulse_ltcy register. ele pulse event flags are latched into the pulse_src register . reading of the pulse_src register clears the event flag. default value: 0. 0: event flag latch disabled; 1: event flag latch enabled zdpefe event flag enable on double pulse even t on z-axis. default value: 0. 0: event detection disabl ed; 1: event detection enabled zspefe event flag enable on single pulse even t on z-axis. default value: 0. 0: event detection disabl ed; 1: event detection enabled ydpefe event flag enable on double pulse event on y-axis. default value: 0. 0: event detection disabl ed; 1: event detection enabled yspefe event flag enable on single pulse even t on y-axis. default value: 0. 0: event detection disabl ed; 1: event detection enabled xdpefe event flag enable on double pulse event on x-axis. default value: 0. 0: event detection disabl ed; 1: event detection enabled xspefe event flag enable on single pulse even t on x-axis. default value: 0. 0: event detection disabl ed; 1: event detection enabled 0x22: pulse_src register (read only) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ea axz axy axx dpe polz poly polx table 37. pulse_src description ea event active flag. default value: 0. (0: no interrupt has been generated; 1: one or more interrupt events have been generated) axz z-axis event. default value: 0. (0: no interrupt; 1: z-axis event has occurred) axy y-axis event. default value: 0. (0: no interrupt; 1: y-axis event has occurred) axx x-axis event. default value: 0. (0: no interrupt; 1: x-axis event has occurred) dpe double pulse on first event. default value: 0. (0: single pulse event triggered interrupt; 1: double pulse event triggered interrupt) polz pulse polarity of z-axis event. default value: 0. (0: pulse event that triggered interrupt was positive ; 1: pulse event that triggered interrupt was negative) poly pulse polarity of y-axis event. default value: 0. (0: pulse event that triggered interrupt was positive ; 1: pulse event that triggered interrupt was negative) polx pulse polarity of x-axis event. default value: 0. (0: pulse event that triggered interrupt was positive ; 1: pulse event that triggered interrupt was negative)
MMA8452Q sensors freescale semiconductor, inc. 33 0x23 - 0x25: pulse_thsx, y, z puls e threshold for x, y & z registers the pulse threshold can be set separately for the x, y and z axes. the pulse_thsx, pulse_thsy and pulse_thsz registers define the thre shold which is used by the system to start the pulse detection procedure. the threshold values range from 1 to 127 with steps of 0. 63g/lsb at a fixed 8g acceleration range, thus the minimum resolution is always fixed at 0.063g/lsb. if the low-noise bit in register 0x2a is set then the maximum threshold will be 4g. t he pulse_thsx, pulse_thsy and pulse_thsz re gisters define the threshold which is us ed by the system to start the pulse detection procedure. the threshold value is ex pressed over 7-bits as an unsigned number. 0x26: pulse_tmlt pulse time window 1 register the bits tmlt7 through tmlt0 define the maximum time interval that can elapse between the start of the acceleration on the selected axis exceeding the specified threshold and the end when the acceleration on the selected axis must go below the specified threshold to be considered a valid pulse. the minimum time step for the pulse time limit is defined in ta b l e 4 2 and table 43 . maximum time for a given odr and oversampling mode is the time step pulse multiplied by 255. the time steps available are dependent on the oversampling mode and whether the pulse low-pass filter option is enabled or not. the pulse low-pa ss filter is set in register 0x0f. 0x23: pulse_thsx register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 thsx6 thsx5 thsx4 thsx3 thsx2 thsx1 thsx0 table 38. pulse_thsx description thsx[6:0] pulse threshold on x-axis. default value: 000_0000. 0x24: pulse_thsy register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 thsy6 thsy5 thsy4 thsy3 thsy2 thsy1 thsy0 table 39. pulse_thsy description thsy[6:0] pulse threshold on y-axis. default value: 000_0000. 0x25: pulse_thsz register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 thsz6 thsz5 thsz4 thsz3 thsz2 thsz1 thsz0 table 40. pulse_th sz description thsz[6:0] pulse threshold on z-axis. default value: 000_0000. 0x26: pulse_tmlt register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 tmlt7 tmlt6 tmlt5 tmlt4 tmlt3 tmlt2 tmlt1 tmlt0 table 41. pulse_tmlt description tmlt[7:0] pulse time limit. default value: 0000_0000. table 42. time step for pulse time limit (reg 0x0f) pulse_lpf_en = 1 odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.319 0.319 0.319 0.319 1.25 1.25 1.25 1.25 400 0.638 0.638 0.638 0.638 2.5 2.5 2.5 2.5 200 1.28 1.28 0.638 1.28 5 5 2.5 5 100 2.55 2.55 0.638 2.55 10 10 2.5 10 50 5.1 5.1 0.638 5.1 20 20 2.5 20 12.5 5.1 20.4 0.638 20.4 20 80 2.5 80 6.25 5.1 20.4 0.638 40.8 20 80 2.5 160 1.56 5.1 20.4 0.638 40.8 20 80 2.5 160
MMA8452Q sensors 34 freescale semiconductor, inc. 0x27: pulse_ltcy pulse latency timer register the bits ltcy7 through ltcy0 define the time interval that starts after the first pulse detection. during this time interval, a ll pulses are ignored. note: this timer must be set for single pulse and for double pulse. the minimum time step for the pulse latency is defined in table 45 and ta b l e 4 6 . the maximum time is th e time step at the odr and oversampling mode multiplied by 255. the timing also changes when the pulse lpf is enabled or disabled. table 43. time step for pulse time limit (reg 0x0f) pulse_lpf_en = 0 odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.159 0.159 0.159 0.159 0.625 0.625 0.625 0.625 400 0.159 0.159 0.159 0.319 0.625 0.625 0.625 1.25 200 0.319 0.319 0.159 0.638 1.25 1.25 0.625 2.5 100 0.638 0.638 0.159 1.28 2.5 2.5 0.625 5 50 1.28 1.28 0.159 2.55 5 5 0.625 10 12.5 1.28 5.1 0.159 10.2 5 20 0.625 40 6.25 1.28 5.1 0.159 10.2 5 20 0.625 40 1.56 1.28 5.1 0.159 10.2 5 20 0.625 40 0x27: pulse_ltcy register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 ltcy7 ltcy6 ltcy5 ltcy4 ltcy3 ltcy2 ltcy1 ltcy0 table 44. pulse_ltcy description ltcy[7:0] latency time limit. default value: 0000_0000 table 45. time step for pulse latency @ odr and power mode (reg 0x0f) pulse_lpf_en = 1 odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.638 0.638 0.638 0.638 2.5 2.5 2.5 2.5 4 0 01 . 2 7 61 . 2 7 61 . 2 7 61 . 2 7 65555 200 2.56 2.56 1.276 2.56 10 10 5 10 100 5.1 5.1 1.276 5.1 20 20 5 20 50 10.2 10.2 1.276 10.2 40 40 5 40 12.5 10.2 40.8 1.276 40.8 40 160 5 160 6.25 10.2 40.8 1.276 81.6 40 160 5 320 1.56 10.2 40.8 1.276 81.6 40 160 5 320 table 46. time step for pulse latency @ odr and power mode (reg 0x0f) pulse_lpf_en = 0 odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.318 0.318 0.318 0.318 1.25 1.25 1.25 1.25 400 0.318 0.318 0.318 0.638 1.25 1.25 1.25 2.5 200 0.638 0.638 0.318 1.276 2.5 2.5 1.25 5 100 1.276 1.276 0.318 2.56 5 5 1.25 10 50 2.56 2.56 0.318 5.1 10 10 1.25 20 12.5 2.56 10.2 0.318 20.4 10 40 1.25 80 6.25 2.56 10.2 0.318 20.4 10 40 1.25 80 1.56 2.56 10.2 0.318 20.4 10 40 1.25 80
MMA8452Q sensors freescale semiconductor, inc. 35 0x28: pulse_wind register (read/write) the bits wind7 through wind0 define the maximum interval of time that can elapse after the end of the latency interval in which the start of the second pulse event must be detected provided the device has been configured for double pulse detection. the detected second pulse width must be shorter than the time limi t constraints specified by the pulse_tmlt register, but the end of the double pulse need not finish within t he time specified by the pulse_wind register. the minimum time step for the pulse window is defined in table 48 and table 49 . the maximum time is the time step at the odr, oversampling mode and lpf filter option multiplied by 255. 0x28: pulse_wind second pulse time window register bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 wind7 wind6 wind5 wind4 wind3 wind2 wind1 wind0 table 47. pulse_wind description wind[7:0] second pulse time window. default value: 0000_0000. table 48. time step for pulse detection window @ odr and power mode (reg 0x0f) pulse_lpf_en = 1 odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.638 0.638 0.638 0.638 2.5 2.5 2.5 2.5 400 1.276 1.276 1.276 1.276 5 5 5 5 200 2.56 2.56 1.276 2.56 10 10 5 10 100 5.1 5.1 1.276 5.1 20 20 5 20 50 10.2 10.2 1.276 10.2 40 40 5 40 12.5 10.2 40.8 1.276 40.8 40 160 5 160 6.25 10.2 40.8 1.276 81.6 40 160 5 320 1.56 10.2 40.8 1.276 81.6 40 160 5 320 table 49. time step for pulse detection window @ odr and power mode (reg 0x0f) pulse_lpf_en = 0 odr (hz) max time range (s) time step (ms) normal lpln highres lp normal lpln highres lp 800 0.318 0.318 0.318 0.318 1.25 1.25 1.25 1.25 400 0.318 0.318 0.318 0.638 1.25 1.25 1.25 2.5 200 0.638 0.638 0.318 1.276 2.5 2.5 1.25 5 100 1.276 1.276 0.318 2.56 5 5 1.25 10 50 2.56 2.56 0.318 5.1 10 10 1.25 20 12.5 2.56 10.2 0.318 20.4 10 40 1.25 80 6.25 2.56 10.2 0.318 20.4 10 40 1.25 80 1.56 2.56 10.2 0.318 20.4 10 40 1.25 80
MMA8452Q sensors 36 freescale semiconductor, inc. 6.6 auto-wake/sleep detection the aslp_count register sets the minimum time period of inac tivity required to change current odr value from the value specified in the dr[2:0] register to aslp_rate register value, provided the slpe bit is set to a logic ?1? in the ctrl_reg2 register. see ta b l e 5 2 for functional blocks th at may be monitored fo r inactivity in order to trigge r the ?return to sleep? event. d7-d0 defines the minimum duration time to change current odr value from dr to aslp_rate . time step and maximum value depend on the odr chosen as shown in ta b l e 5 1 . in order to wake the device, t he desired function or functions must be enab led in ctrl_reg4 and se t to wake to sleep in ctrl_reg3. all enabl ed functions will still function in sleep mode at th e sleep odr. only the fu nctions that have been selected for wake from sleep will wake the device. MMA8452Q has 4 functions that can be used to keep the sensor from falling asleep namely, transient, orientation, pulse, and motion/ff. one or more of th ese functions can be enabled. in order to wake the de vice, 4 functions ar e provided namely, transient, orientation, pulse, and the motion/freefall. the auto-w ake/sleep interrupt does not affect the wake/sleep, nor does the data ready interrupt . see register 0x2c for the wake from sleep bits. if the auto-sleep bit is disabled, then the device can only toggle between standby and wake mode. if auto-sleep interrupt is enabled, transitioning from active mode to auto-sleep mode an d vice versa gener ates an interrupt. 0x29: aslp_count register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 d7 d6 d5 d4 d3 d2 d1 d0 table 50. aslp_count description d[7:0] duration value. default value: 0000_0000. table 51. aslp_count relationship with odr output data rate (odr) duration odr time step aslp_count step 800 hz 0 to 81s 1.25 ms 320 ms 400 hz 0 to 81s 2.5 ms 320 ms 200 hz 0 to 81s 5 ms 320 ms 100 hz 0 to 81s 10 ms 320 ms 50 hz 0 to 81s 20 ms 320 ms 12.5 hz 0 to 81s 80 ms 320 ms 6.25 hz 0 to 81s 160 ms 320 ms 1.56 hz 0 to 162s 640 ms 640 ms table 52. sleep/wake m ode gates an d triggers interrupt source event restarts timer and delays return to sleep event will wake from sleep src_trans yes yes src_lndprt yes yes src_pulse yes yes src_ff_mt yes yes src_aslp no* no* src_drdy no no
MMA8452Q sensors freescale semiconductor, inc. 37 6.7 control registers note: except for standby mode selection, the device must be in standby mode to change any of the fields within ctrl_reg1 (0x2a). 0x2a: ctrl_reg1 system control 1 register it is important to note that when the device is auto-sl eep mode, the system odr and t he data rate for all the system functional blocks are overridden by the data rate set by the aslp_rate field. dr[2:0] bits select the output data rate (odr) for acceleration samples. the default value is 000 for a data rate of 800 hz. active bit selects between standby mode and active mode. the default value is 0 for standby mode. lnoise bit selects between normal full dynamic range mode and a hi gh sensitivity, low-noise mode. in low-noise mode the maximum signal that can be measured is 4g. note: any thresholds set above 4g will not be reached. f_read bit selects between normal and fast read mode. when select ed, the auto-increment counter will skip over the lsb data bytes. 0x2a: ctrl_reg1 register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 aslp_rate1 aslp_rate0 dr2 dr1 dr0 lnoise f_read active table 53. ctrl_reg1 description aslp_rate[1:0] configures the auto-wake sample frequency when the device is in sleep mode. default value: 00. see table 54 for more information. dr[2:0] data rate selection. default value: 000. see table 55 for more information. lnoise reduced noise reduced maximum range mode. default value: 0. (0: normal mode; 1: reduced noise mode) f_read fast read mode: data format limited to single byte default value: 0. (0: normal mode 1: fast read mode) active full scale selection. default value: 00. (0: standby mode; 1: active mode) table 54. sleep mode rate description aslp_rate1 aslp_rate0 frequency (hz) 00 5 0 0 1 12.5 1 0 6.25 1 1 1.56 table 55. system output data rate selection dr2 dr1 dr0 odr period 0 0 0 800 hz 1.25 ms 0 0 1 400 hz 2.5 ms 0 1 0 200 hz 5 ms 0 1 1 100 hz 10 ms 1 0 0 50 hz 20 ms 1 0 1 12.5 hz 80 ms 1 1 0 6.25 hz 160 ms 1 1 1 1.56 hz 640 ms table 56. full scale selection active mode 0s t a n d b y 1a c t i v e
MMA8452Q sensors 38 freescale semiconductor, inc. 0x2b: ctrl_reg2 system control 2 register st bit activates the self-test function. when st is set, x, y, and z outputs will shift. rst bit is used to activate the software reset. the reset mechanism can be enabled in standby and active mode. when the reset bit is enabled, all registers are rest and are loaded with default values. writing ?1? to the rst bit immediatel y resets the device, no matter whether it is in active/wake, active/sleep, or standby mode. the i 2 c communication system is reset to avoid accidental corrupted data access. at the end of the boot process the rs t bit is deasserted to 0. reading this bit will return a value of zero. the (s)mods[1:0] bits select which oversampling mode is to be used shown in ta b l e 5 8 . the oversampling modes are available in both wake mode mod[1:0] and also in the sleep mode smod[1:0]. 0x2b: ctrl_reg2 register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 st rst 0 smods1 smods0 slpe mods1 mods0 table 57. ctrl_reg2 description st self-test enable. default value: 0. 0: self-test disabled; 1: self-test enabled rst software reset. default value: 0. 0: device reset disabled; 1: device reset enabled. smods[1:0] sleep mode power scheme selection. default value: 00. see table 58 and table 59 slpe auto-sleep enable. default value: 0. 0: auto-sleep is not enabled; 1: auto-sleep is enabled. mods[1:0] active mode power scheme selection. default value: 00. see table 58 and table 59 table 58. mods oversampling modes (s)mods1 (s)mods0 power mode 00 n o r m a l 0 1 low noise low power 1 0 high resolution 1 1 low power table 59. mods oversampling modes current consumption and averaging values at each odr mode normal (00) low noise low power (01) high resolution (10) low power (11) odr current a os ratio current a os ratio current a os ratio current aos ratio 1.56 hz 24 128 8 32 165 1024 6 16 6.25 hz 24 32 8 8 165 256 6 4 12.5 hz 24 16 8 4 165 128 6 2 50 hz 24 4 24 4 165 32 14 2 100 hz 44 4 44 4 165 16 24 2 200 hz 85 4 85 4 165 8 44 2 400 hz 165 4 165 4 165 4 85 2 800 hz 165 2 165 2 165 2 165 2
MMA8452Q sensors freescale semiconductor, inc. 39 0x2c: ctrl_reg3 interrupt control register ipol bit selects the polarity of the interrupt signal. when ipol is ?0? (default value) any interrupt event will signaled with a logical 0. pp_od bit configures the interrupt pin to push-pull or in open drain mode. the default value is 0 which corresponds to push- pull mode. the open drain configuration can be used for connec ting multiple interrupt signals on the same interrupt line. 0x2d: ctrl_reg4 register (read/write) the corresponding functional block interrupt enable bit allows the functional block to route its event detection flags to the system?s interrupt controller. the interrupt controller routes the enabled functional block interrupt to the int1 or int2 pin. 0x2c: ctrl_reg3 register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 0 wake_trans wake_lndprt wake_pulse wake_ff_mt 0 ipol pp_od table 60. ctrl_reg3 description wake_trans 0: transient function is bypassed in sleep mode. default value: 0. 1: transient function interrupt can wake up system wake_lndprt 0: orientation function is bypassed in sleep mode. default value: 0. 1: orientation function interrupt can wake up system wake_pulse 0: pulse function is bypassed in sleep mode. default value: 0. 1: pulse function interrupt can wake up system wake_ff_mt 0: freefall/motion function is bypass ed in sleep mode. default value: 0. 1: freefall/motion function interrupt can wake up ipol interrupt polarity active high, or active low. default value: 0. 0: active low; 1: active high pp_od push-pull/open drain selection on interrupt pad. default value: 0. 0: push-pull; 1: open drain 0x2d: ctrl_reg4 register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 int_en_aslp 0 int_en_trans int_en_lndprt int_en_pulse int_en_ff_mt 0 int_en_drdy table 61. interrupt enable register description interrupt enable descript i on int_en_aslp interrupt enable. default value: 0. 0: auto-sleep/wake interrupt disabled; 1: auto-sleep/wake interrupt enabled. int_en_trans interrupt enable. default value: 0. 0: transient interrupt disabled; 1: transient interrupt enabled. int_en_lndprt interrupt enable. default value: 0. 0: orientation (landscape/portrait) interrupt disabled. 1: orientation (landscape/portrait) interrupt enabled. int_en_pulse interrupt enable. default value: 0. 0: pulse detection interrupt disabled; 1: pulse detection interrupt enabled int_en_ff_mt interrupt enable. default value: 0. 0: freefall/motion interrupt disabled; 1: freefall/motion interrupt enabled int_en_drdy interrupt enable. default value: 0. 0: data ready interrupt disabled; 1: data ready interrupt enabled
MMA8452Q sensors 40 freescale semiconductor, inc. 0x2e: ctrl_reg5 register (read/write) the system?s interrupt controller shown in figure 10 uses the corresponding bit field in the ctrl_reg5 register to determine the routing table for the int1 and int2 interrupt pins. if the bit value is logic ?0? the functional block?s interrupt is route d to int2, and if the bit value is logic ?1? then the interrupt is routed to int1. one or more functions can assert an interrupt pin; ther efore a host application responding to an interrupt should read the int_source (0x0c) register to determine the appropriate sources of the interrupt. 6.8 user offset correction registers for more information on how to calibrate the 0g offset refer to an4069 offset calibration using the MMA8452Q. the 2?s complement offset correction registers values are used to realign the zero-g position of the x, y , and z-axis after device board mount. the resolution of the offset registers is 2 mg per lsb. the 2?s complement 8-bit value would result in an offset compensation range 256 mg. 0x2f: off_x offset correction x register 0x30: off_y offset correction y register 0x31: off_z offset co rrection z register 0x2e: ctrl_reg5 interrupt configuration register bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 int_cfg_aslp 0 int_cfg_trans int_cfg_lndprt int_cfg_pulse int_cfg_ff_mt 0 int_cfg_drdy table 62. interrupt configuration register description interrupt configuration description int_cfg_aslp int1/int2 configuration. default value: 0. 0: interrupt is routed to int2 pin; 1: interrupt is routed to int1 pin int_cfg_trans int1/int2 configuration. default value: 0. 0: interrupt is routed to int2 pin; 1: interrupt is routed to int1 pin int_cfg_lndprt int1/int2 configuration. default value: 0. 0: interrupt is routed to int2 pin; 1: interrupt is routed to int1 pin int_cfg_pulse int1/int2 configuration. default value: 0. 0: interrupt is routed to int2 pin; 1: interrupt is routed to int1 pin int_cfg_ff_mt int1/int2 configuration. default value: 0. 0: interrupt is routed to int2 pin; 1: interrupt is routed to int1 pin int_cfg_drdy int1/int2 configuration. default value: 0. 0: interrupt is routed to int2 pin; 1: interrupt is routed to int1 pin 0x2f: off_x register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 d7 d6 d5 d4 d3 d2 d1 d0 table 63. off_x description d[7:0] x-axis offset value. default value: 0000_0000. 0x30: off_y register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 d7 d6 d5 d4 d3 d2 d1 d0 table 64. off_y description d[7:0] y-axis offset value. default value: 0000_0000. 0x31: off_z register (read/write) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 d7 d6 d5 d4 d3 d2 d1 d0 table 65. off_z description d[7:0] z-axis offset value. default value: 0000_0000.
MMA8452Q sensors freescale semiconductor, inc. 41 table 66. MMA8452Q register map reg name definition bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 00 status data status r zyxow zow yow xow zyxdr zdr ydr xdr 01 out_x_msb 12-bit x data r xd9 xd8 xd7 xd6 xd5 xd4 xd3 xd2 02 out_x_lsb 12-bit x data r xd1 xd0 0 0 0 0 0 0 03 out_y_msb 12-bit y data r yd9 yd8 yd7 yd6 yd5 yd4 yd3 yd2 04 out_y_lsb 12-bit y data r yd1 yd0 0 0 0 0 0 0 05 out_z_msb 12-bit z data r zd9 zd8 zd7 zd6 zd5 zd4 zd3 zd2 06 out_z_lsb 12-bit z data r zd1 zd0 0 0 0 0 0 0 0b sysmod system mode r 0 0 0 0 0 0 sysmod1 sysmod0 0c int_source interrupt status r src_aslp 0 src_trans src_lndprt src_pulse src_ff_mt 0 src_drdy 0d who_am_i id register r 0 0 1 0 1 0 1 0 0e xyz_data_cfg data config r/w 0 0 0 hpf_out 0 0 fs1 fs0 0f hp_filter_cutoff hp filter setting r/w 0 0 pulse_hpf_byp pulse_lpf_en 0 0 sel1 sel0 10 pl_status pl status r newlp lo 0 0 0 lapo[1] lapo[0] bafro 11 pl_cfg pl configuration r/w dbcntm pl_en 0 0 0 0 0 0 12 pl_count pl debounce r/w dbnce[7] dbnce[6] dbnce[5] dbnce[4] dbnce[3] dbnce[2] dbnce[1] dbnce[0] 13 pl_bf_zcomp pl back/front z comp r bkfr[1] bkfr[0] 0 0 0 zlock[2] zlock[1] zlock[0] 14 p_l_ths_reg pl threshold r p_l_ths[4] p_l_ths[3] p_l_ths[2] p_l_ths[1] p_l_ths[0] hys[2] hys[1] hys[0] 15 ff_mt_cfg freefall/motion config r/w ele oae zefe yefe xefe 0 0 0 16 ff_mt_src freefall/motion source r ea 0 zhe zhp yhe yhp xhe xhp 17 ff_mt_ths freefall/motion threshold r/w dbcntm ths6 ths5 ths4 ths3 ths2 ths1 ths0 18 ff_mt_count freefall/motion debounce r/w d7 d6 d5 d4 d3 d2 d1 d0 1d transient_cfg transient config r/w 0 0 0 ele ztefe ytefe xtefe hpf_byp 1e transient_src transient source r 0 ea ztranse z_trans_pol ytranse y_trans_pol xtranse x_trans_pol 1f transient_ths transient threshold r/w dbcntm ths6 ths5 ths4 ths3 ths2 ths1 ths0 20 transient_count transient debounce r/w d7 d6 d5 d4 d3 d2 d1 d0 21 pulse_cfg pulse config r/w dpa ele zdpefe zspefe ydpefe yspefe xdpefe xspefe 22 pulse_src pulse source r ea axz axy axx dpe pol_z pol_y pol_x 23 pulse_thsx pulse x threshold r/w 0 thsx6 thsx5 thsx4 thsx3 thsx2 thsx1 thsx0 24 pulse_thsy pulse y threshold r/w 0 thsy6 thsy5 thsy4 thsy3 thsy2 thsy1 thsy0 25 pulse_thsz pulse z threshold r/w 0 thsz6 thsz5 thsz4 thsz3 thsz2 thsz1 thsz0 26 pulse_tmlt pulse first timer r/w tmlt7 tmlt6 tmlt5 tmlt4 tmlt3 tmlt2 tmlt1 tmlt0 27 pulse_ltcy pulse latency r/w ltcy7 ltcy6 ltcy5 ltcy4 ltcy3 ltcy2 ltcy1 ltcy0 28 pulse_wind pulse 2nd window r/w wind7 wind6 wind5 wind4 wind3 wind2 wind1 wind0 29 aslp_count auto-sleep counter r/w d7 d6 d5 d4 d3 d2 d1 d0 2a ctrl_reg1 control reg1 r/w aslp_rate1 aslp_rate0 dr2 dr1 dr0 lnoise f_read active 2b ctrl_reg2 control reg2 r/w st rst 0 smods1 smods0 slpe mods1 mods0 2c ctrl_reg3 control reg3 (wake interrupts from sleep) r/w 0 wake_trans wake_lndprt wake_pulse wake_ff_mt 0 ipol pp_od 2d ctrl_reg4 control reg4 (interrupt enable map) r/w int_en_aslp 0 int_en_trans int_en_lndprt int_en_pulse int_en_ff_mt 0 int_en_drdy
MMA8452Q sensors 42 freescale semiconductor, inc. 2e ctrl_reg5 control reg5 (interrupt configuration) r/w int_cfg_aslp 0 int_cfg_trans int_cfg_lndpr t int_cfg_pulse int_cfg_ff_mt 0 int_cfg_drd y 2f off_x x 8-bit offset r/w d7 d6 d5 d4 d3 d2 d1 d0 30 off_y y 8-bit offset r/w d7 d6 d5 d4 d3 d2 d1 d0 31 off_z z 8-bit offset r/w d7 d6 d5 d4 d3 d2 d1 d0 table 67. accelerometer output data 12-bit data range 2g (1 mg) range 4g (2 mg) range 8g (3.9 mg) 0111 1111 1111 1.999g +3.998g +7.996g 0111 1111 1110 1.998g +3.996g +7.992g ?? ? ? 0000 0000 0001 0.001g +0.002g +0.004g 0000 0000 0000 0.0000g 0.0000g 0.0000g 1111 1111 1111 -0.001g -0.002g -0.004g ?? ? ? 1000 0000 0001 -1.999g -3.998g -7.996g 1000 0000 0000 -2.0000g -4.0000g -8.0000g 8-bit data range 2g (15.6 mg) range 4g (31.25 mg) range 8g (62.5 mg) 0111 1111 1.9844g +3.9688g +7.9375g 0111 1110 1.9688g +3.9375g +7.8750g ?? ? ? 0000 0001 +0.0156g +0.0313g +0.0625g 0000 0000 0.000g 0.0000g 0.0000g 1111 1111 -0.0156g -0.0313g -0.0625g ?? ? ? 1000 0001 -1.9844g -3.9688g -7.9375g 1000 0000 -2.0000g -4.0000g -8.0000g table 66. MMA8452Q register map
MMA8452Q sensors freescale semiconductor, inc. 43 package dimensions case 2077-02 issue a 16-lead qfn
MMA8452Q sensors 44 freescale semiconductor, inc. package dimensions case 2077-02 issue a 16-lead qfn
MMA8452Q sensors freescale semiconductor, inc. 45 package dimensions case 2077-02 issue a 16-lead qfn
MMA8452Q sensors 46 freescale semiconductor, inc. table 1. revision history revision number revision date description of changes 5 07/2012 ? table 2. updated typ values for sensit ivity accuracy from 2.5% to 2.68%; zero-g level offset accuracy from 20 mg to 17 mg and zero-g level offset accuracy post board mount from 30 mg to 20 mg. ? updated section 2.3 i 2 c interface characteristics ? added table 8. features of the mma845xq devices. ? removed fifo paragraph at the end of section 6.1. ? updated case outline.
document number: MMA8452Q rev. 5 07/2012 information in this document is provided solely to enable system and software implementers to use freescale products. there are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the information in this document. freescale reserves the right to make changes without further notice to any products herein. freescale makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does freescale assume any liability arising out of the app lication or use of an y product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. ?typical? parameters that may be provided in freescale data sheets and/or specifications can and do vary in differen t applications, and actual performance may vary over time. all operating parameters, including ?typicals,? must be validated for each customer application by customer?s technica l experts. freescale does not convey any license under its patent rights nor the rights of others. freescale sells products pursuant to standard terms and conditions of sale, which can be found at the following address: store.esellerate.net/store/policy.asse lectorpx?selector=rt&s=str0326182960&pc. how to reach us: home page: freescale.com web support: freescale.com/support freescale, the freescale logo, altivec, c-5, codetest, codewarrior, coldfire, c-ware, energy efficient solutions logo, kinetis, mobilegt, powerquicc, processor expert, qoriq, qorivva, starcore, symphony, and vortiqa are trademarks of freescale semiconductor, inc., reg. u.s. pat. & tm. off. airfast, beekit, beestack, coldfire+, corenet, flexis, magniv, mxc, platform in a package, qoriq qonverge, quicc engine, ready play, safeassure, smartmos , turbolink, vybrid, and xtrinsic are trademarks of freescale semiconductor, inc. all other product or service names are the property of their respective owners. ? 2012 freescale semiconductor, inc.


▲Up To Search▲   

 
Price & Availability of MMA8452Q

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X